home *** CD-ROM | disk | FTP | other *** search
Wrap
MMMMPPPPIIII____WWWWiiiinnnn((((3333)))) MMMMPPPPIIII____WWWWiiiinnnn((((3333)))) NNNNAAAAMMMMEEEE MMMMPPPPIIII____WWWWiiiinnnn - Manipulates a memory region for one-sided communication SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS C: #include "mpi.h" int MPI_Win_create(void, *_b_a_s_e, MPI_Aint _s_i_z_e, int _d_i_s_p__u_n_i_t, MPI_Info _i_n_f_o, MPI_Comm _c_o_m_m, MPI_Win *_w_i_n); int MPI_Win_fence(int _a_s_s_e_r_t, MPI_Win _w_i_n); int MPI_Win_free(MPI_Win *_w_i_n); int MPI_Get(void *_o_r_i_g_i_n__a_d_d_r, int _o_r_i_g_i_n__c_o_u_n_t, MPI_Datatype _o_r_i_g_i_n__d_a_t_a_t_y_p_e, int _t_a_r_g_e_t__r_a_n_k, MPI_Aint _t_a_r_g_e_t__d_i_s_p, int _t_a_r_g_e_t__c_o_u_n_t, MPI_Datatype _t_a_r_g_e_t__d_a_t_a_t_y_p_e, MPI_Win _w_i_n); int MPI_Put(void *_o_r_i_g_i_n__a_d_d_r, int _o_r_i_g_i_n__c_o_u_n_t, MPI_Datatype _o_r_i_g_i_n__d_a_t_a_t_y_p_e, int _t_a_r_g_e_t__r_a_n_k, MPI_Aint _t_a_r_g_e_t__d_i_s_p, int _t_a_r_g_e_t__c_o_u_n_t, MPI_Datatype _t_a_r_g_e_t__d_a_t_a_t_y_p_e, MPI_Win _w_i_n); Fortran: INCLUDE "mpif.h" (or USE MPI) INTEGER(KIND=MPI_ADDRESS_KIND) _s_i_z_e INTEGER _d_i_s_p__u_n_i_t, _i_n_f_o, _c_o_m_m, _w_i_n, _i_e_r_r_o_r CALL MPI_WIN_CREATE(_b_a_s_e, _s_i_z_e, _d_i_s_p__u_n_i_t, _i_n_f_o, _c_o_m_m, _w_i_n, _i_e_r_r_o_r) INTEGER _a_s_s_e_r_t, _w_i_n, _i_e_r_r_o_r CALL MPI_WIN_FENCE(_a_s_s_e_r_t, _w_i_n, _i_e_r_r_o_r) INTEGER _w_i_n, _i_e_r_r_o_r CALL MPI_WIN_FREE(_w_i_n, _i_e_r_r_o_r) INTEGER(KIND=MPI_ADDRESS_KIND) _t_a_r_g_e_t__d_i_s_p INTEGER _o_r_i_g_i_n__c_o_u_n_t, _o_r_i_g_i_n__d_a_t_a_t_y_p_e, _t_a_r_g_e_t__r_a_n_k, _t_a_r_g_e_t__c_o_u_n_t, _t_a_r_g_e_t__d_a_t_a_t_y_p_e, _w_i_n, _i_e_r_r_o_r <type> _o_r_i_g_i_n__a_d_d_r(*) CALL MPI_GET(_o_r_i_g_i_n__a_d_d_r, _o_r_i_g_i_n__c_o_u_n_t, _o_r_i_g_i_n__d_a_t_a_t_y_p_e, _t_a_r_g_e_t__r_a_n_k, _t_a_r_g_e_t__d_i_s_p, _t_a_r_g_e_t__c_o_u_n_t, _t_a_r_g_e_t__d_a_t_a_t_y_p_e, _w_i_n, _i_e_r_r_o_r) INTEGER(KIND=MPI_ADDRESS_KIND) _t_a_r_g_e_t__d_i_s_p INTEGER _o_r_i_g_i_n__c_o_u_n_t, _o_r_i_g_i_n__d_a_t_a_t_y_p_e, _t_a_r_g_e_t__r_a_n_k, _t_a_r_g_e_t__c_o_u_n_t, _t_a_r_g_e_t__d_a_t_a_t_y_p_e, _w_i_n, _i_e_r_r_o_r PPPPaaaaggggeeee 1111 MMMMPPPPIIII____WWWWiiiinnnn((((3333)))) MMMMPPPPIIII____WWWWiiiinnnn((((3333)))) <type> _o_r_i_g_i_n__a_d_d_r(*) CALL MPI_PUT(_o_r_i_g_i_n__a_d_d_r, _o_r_i_g_i_n__c_o_u_n_t, _o_r_i_g_i_n__d_a_t_a_t_y_p_e, _t_a_r_g_e_t__r_a_n_k, _t_a_r_g_e_t__d_i_s_p, _t_a_r_g_e_t__c_o_u_n_t, _t_a_r_g_e_t__d_a_t_a_t_y_p_e, _w_i_n, _i_e_r_r_o_r) IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN IRIX ABI 64 programs only DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN The following MMMMPPPPIIII____WWWWiiiinnnn routines manipulate a memory region for one-sided communication. MPI one-sided communication is also known as remote memory access (RMA). MMMMPPPPIIII____WWWWiiiinnnn____ccccrrrreeeeaaaatttteeee A collective routine that sets up a memory region, or window, to be the target of MPI one-sided communication. MMMMPPPPIIII____WWWWiiiinnnn____ccccrrrreeeeaaaatttteeee accepts the following arguments: _b_a_s_e Specifies the starting address of the local window. _s_i_z_e Specifies the size of the window in bytes. _d_i_s_p__u_n_i_t Specifies the local unit size for displacements, in bytes. Common choices for _d_i_s_p__u_n_i_t are 1, indicating no scaling, and (in C syntax) ssssiiiizzzzeeeeooooffff(_t_y_p_e), indicating a window that consists of an array of elements of type _t_y_p_e. The latter choice allows the use of array indices in one-sided communications calls, and has those indices scaled correctly to byte displacements. Fortran users can use MMMMPPPPIIII____TTTTYYYYPPPPEEEE____EEEEXXXXTTTTEEEENNNNTTTT or the KKKKIIIINNNNDDDD intrinsic function to get the byte size of basic MPI datatypes. _i_n_f_o Specifies the information object handle or MMMMPPPPIIII____IIIINNNNFFFFOOOO____NNNNUUUULLLLLLLL. Currently, this argument is ignored. _c_o_m_m Specifies the communicator that defines the group of processes to be associated with this set of windows. _w_i_n Specifies the window handle returned by this call. _i_e_r_r_o_r Specifies the return code value for successful completion, which is in MPI_SUCCESS. MPI_SUCCESS is defined in the mmmmppppiiiiffff....hhhh file. PPPPaaaaggggeeee 2222 MMMMPPPPIIII____WWWWiiiinnnn((((3333)))) MMMMPPPPIIII____WWWWiiiinnnn((((3333)))) MMMMPPPPIIII____WWWWiiiinnnn____ffffeeeennnncccceeee Waits for completion of locally issued RMA operations and performs a barrier synchronization of all processes in the group of the specified RMA window. MMMMPPPPIIII____WWWWiiiinnnn____ffffeeeennnncccceeee accepts the following arguments: _w_i_n Specifies the window object (handle). _a_s_s_e_r_t Provides assertions on the context of the call. This argument can be used for various optimizations. A value of _a_s_s_e_r_t ==== 0000 iiiissss aaaallllwwwwaaaayyyyssss vvvvaaaalllliiiidddd.... MMMMPPPPIIII____WWWWiiiinnnn____ffffrrrreeeeeeee Deletes an RMA window object. MMMMPPPPIIII____WWWWiiiinnnn____ffffrrrreeeeeeee accepts the following argument: _w_i_n Specifies the window object (handle). MMMMPPPPIIII____GGGGeeeetttt Transfers data from an RMA window on a specified target process to a buffer on the origin process. The origin process is the process that makes the RMA call. MMMMPPPPIIII____GGGGeeeetttt accepts the following arguments: _o_r_i_g_i_n__a_d_d_r Specifies the initial address of the buffer on the origin process into which the data will be transferred. (choice). _o_r_i_g_i_n__c_o_u_n_t Specifies the number of entries in the origin buffer (nonnegative integer). _o_r_i_g_i_n__d_a_t_a_t_y_p_e Specifies the datatype of each entry in the origin buffer (handle). _t_a_r_g_e_t__r_a_n_k Specifies the rank of the target (nonnegative integer). _t_a_r_g_e_t__d_i_s_p Specifies the displacement from start of window to target buffer (nonnegative integer). The target buffer is the location in the target process window from which the data will be copied. The displacement unit is defined by MMMMPPPPIIII____WWWWiiiinnnn____ccccrrrreeeeaaaatttteeee. PPPPaaaaggggeeee 3333 MMMMPPPPIIII____WWWWiiiinnnn((((3333)))) MMMMPPPPIIII____WWWWiiiinnnn((((3333)))) _t_a_r_g_e_t__c_o_u_n_t Specifies the number of entries in the target buffer (nonnegative integer). _t_a_r_g_e_t__d_a_t_a_t_y_p_e Specifies the datatype of each entry in the target buffer (handle). _w_i_n Specifies the window object used for communication (handle). MMMMPPPPIIII____PPPPuuuutttt Transfers data from a buffer on the origin process into an RMA window on a specified target process. MMMMPPPPIIII____PPPPuuuutttt accepts the following arguments: _o_r_i_g_i_n__a_d_d_r Specifies the initial address of the buffer on the origin process from which the data will be transferred. (choice). _o_r_i_g_i_n__c_o_u_n_t Specifies the number of entries in the origin buffer (nonnegative integer). _o_r_i_g_i_n__d_a_t_a_t_y_p_e Specifies the datatype of each entry in the origin buffer (handle). _t_a_r_g_e_t__r_a_n_k Specifies the rank of the target (nonnegative integer). _t_a_r_g_e_t__d_i_s_p Specifies the displacement from start of window to target buffer (nonnegative integer). The target buffer is the location in the target process window into which the data will be copied. The displacement unit is defined by MMMMPPPPIIII____WWWWiiiinnnn____ccccrrrreeeeaaaatttteeee. _t_a_r_g_e_t__c_o_u_n_t Specifies the number of entries in the target buffer (nonnegative integer). _t_a_r_g_e_t__d_a_t_a_t_y_p_e Specifies the datatype of each entry in the target buffer (handle). _w_i_n Specifies the window object used for communication (handle). PPPPaaaaggggeeee 4444 MMMMPPPPIIII____WWWWiiiinnnn((((3333)))) MMMMPPPPIIII____WWWWiiiinnnn((((3333)))) After a call to MMMMPPPPIIII____WWWWiiiinnnn____ccccrrrreeeeaaaatttteeee, any process in the group can issue MMMMPPPPIIII____PPPPuuuutttt or MMMMPPPPIIII____GGGGeeeetttt requests to any part of these memory regions, subject to the constraints for conflicting accesses outlined in the MPI-2 standard. The current IRIX implementation of one-sided communication has the following limitations: * The communicator must reside completely on a single host. * The memory window must be in a remotely accessible memory region. The following types of memory qualify: - Static memory (C) - Arrays within common blocks (Fortran) - Save variables and arrays (Fortran) - Symmetric heap (allocated with sssshhhhmmmmaaaalllllllloooocccc or SSSSHHHHPPPPAAAALLLLLLLLOOOOCCCC) - Global heap (allocated with the Fortran 90 AAAALLLLLLLLOOOOCCCCAAAATTTTEEEE command and MIPSpro 7.3.1 lm or later and the SSSSMMMMAAAA____GGGGLLLLOOOOBBBBAAAALLLL____AAAALLLLLLLLOOOOCCCC environment variable set to any value. * The ddddiiiisssspppp____uuuunnnniiiitttt value passed to MMMMPPPPIIII____WWWWiiiinnnn____ccccrrrreeeeaaaatttteeee must be the same on all processes. * The data type passed to MMMMPPPPIIII____PPPPuuuutttt or MMMMPPPPIIII____GGGGeeeetttt must have contiguous storage. * Currently, the only supported RMA functions are MMMMPPPPIIII____WWWWiiiinnnn____ccccrrrreeeeaaaatttteeee, MMMMPPPPIIII____WWWWiiiinnnn____ffffrrrreeeeeeee, MMMMPPPPIIII____PPPPuuuutttt, MMMMPPPPIIII____GGGGeeeetttt, and MMMMPPPPIIII____WWWWiiiinnnn____ffffeeeennnncccceeee. The MMMMPPPPIIII____PPPPuuuutttt, MMMMPPPPIIII____GGGGeeeetttt, and MMMMPPPPIIII____WWWWiiiinnnn____ffffeeeennnncccceeee functions provide the tools needed to code a "compute-synchronize-communicate-synchronize" sequence strategy for parallel programming. Note that the MMMMPPPPIIII____WWWWiiiinnnn____ffffeeeennnncccceeee function is essentially a barrier synchronization function. NNNNOOOOTTTTEEEESSSS Use of MMMMPPPPIIII____PPPPuuuutttt and MMMMPPPPIIII____GGGGeeeetttt in Fortran programs requires that you compile with the ----LLLLAAAANNNNGGGG::::rrrreeeeccccuuuurrrrssssiiiivvvveeee====oooonnnn option on the ffff77777777 or ffff99990000 command line when RMA windows are created in SAVE arrays that are not in common blocks. We recommend that, to be safe, you always specify ----LLLLAAAANNNNGGGG::::rrrreeeeccccuuuurrrrssssiiiivvvveeee====oooonnnn. SSSSEEEEEEEE AAAALLLLSSSSOOOO MMMMPPPPIIII(1) PPPPaaaaggggeeee 5555